<template>
	<view class="searchBox">
		 <view class="header-input" @click="toSearch">
		      <image src="../../static/ic_home_search.png" />
		      <text>请输入食物名称</text>
		      <image src="../../static/ic_library_scan.png" />
		    </view>
	</view>
</template>

<script>
	export default {
		name:"HomeSearch",
		data() {
			return {
				
			};
		},
		methods:{
			toSearch(){
				uni.navigateTo({
					url:"../../subpkg/SearchPage/SearchPage"
				})
			}
		}
	}
</script>

<style lang="scss">
.searchBox {
  overflow: hidden;
  height: 100px;
  background: #EA8B51;
  .header-input {
    display: flex;
    margin: 0 auto;
    width: 94%;
    background: white;
    justify-content: space-between;
    align-items: center;
    height: 45px;
    box-sizing: border-box;
    padding: 0 10px;
    margin-top: 40px;
    border-radius: 10px;
    image {
      &:nth-of-type(1) {
        width: 25px;
        height: 25px;
      }
      &:nth-of-type(2) {
        width: 30px;
        height: 30px;
      }
    }
    text {
      flex: 1;
      text-align: left;
      font-size: 15px;
      margin-left: 5px;
      color: #e68547;
      letter-spacing: 1px;
    }
  }
}
</style>
